﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SearchSucursal')
	BEGIN
		DROP  Procedure  SearchSucursal
	END

GO

CREATE Procedure SearchSucursal

	(
		@direccion nvarchar(50)
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Direccion],
	[EsPrincipal],
	[IdSucursal],
	[IdUbigeo],
	[Telefono]
	FROM [Sucursal] 
	WHERE [Direccion] LIKE (@direccion + N'%')

	SET NOCOUNT OFF
END

GO


GRANT EXEC ON SearchSucursal TO PUBLIC

GO


